package com.yc.book.dao;

import java.sql.SQLException;
import java.util.Map;

import jdbc_2.DBHelper;

public class ReaderDao {
	
	public static void main(String[] args) throws SQLException {
		new ReaderDao().selectForlogin("test", "123");
	}

	
	
	/*
	 * 登录查询
	 * 
	 */
	
	public Map<String,Object> selectForlogin(String name, String pwd) throws SQLException{
		String sql = "select * from reader where name = ? and pwd = ?";
		return DBHelper.selectOneMap(sql, name,pwd);
	}
	
}
